<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<jsp:include page="/lmAdm/adm_global_include/adm_global_header.jsp" flush="false"></jsp:include>

<title>관리자 페이지 - 로그인</title>

<c:if test="${errCode == null}">
	<c:set var="errCode" value="\"\""></c:set>
</c:if>
<script type="text/javascript" >
  function _onSubmit(val){
    obj = document.form1;
    if(obj.me_uid.value ==""){
      alert("아이디를 입력해 주세요");
      obj.me_uid.focus();
      return false;
    } 
    if(obj.me_pwd.value ==""){
      alert("비밀번호를 입력해 주세요");
      obj.me_pwd.focus();
      return false;
    }    
  }
  
  
  function checkErrCode(){
		var errCode = ${errCode};
		if(errCode != null || errCode != ""){
			switch (errCode) {
			case 1:
				alert("아이디나 비밀번호가 맞지 않습니다.!");
				break;
			case 2:
				alert("관리자 레벨이 아닙니다.!");
				break;
			case 3:
				alert("로그아웃하였습니다.!");
				break;
			}
		}
	}
</script>
</head>
<body onload="checkErrCode();">

<!-- 전체랩 -->
<div id="adminWrapper"> 
  <!-- 헤더 -->
  <div id="adminHeaderWrap">
  <%@ include file="/lmAdm/adm_global_include/adm_header_login.jsp" %>
  </div>
  <!-- //헤더 --> 
  <!-- 로그인랩 -->
  <div class="adminLoginWrap"> 
    <!-- 로그인 -->
    <div class="adminLogin"> 
      <!-- 로그인폼 -->
       <spring:hasBindErrors name="LoginModel" />
      <span class="error"><form:errors path="LoginModel.me_uid" /></span><br/>
	<span class="error"><form:errors path="LoginModel.me_pwd" /></span><br/>
      <form name="form1" method="post" onsubmit="return _onSubmit(this);" action="<%=request.getContextPath()%>/lmAdm/loginProcess.do">
        <fieldset>
          <legend>관리자페이지 로그인</legend>
          <label for="me_uid">아이디</label>
          <input type="text" id="me_uid" name="me_uid" value="" />
          <label for="me_pwd">비밀번호</label>
          <input type="password" id="me_pwd" name="me_pwd" value="" maxlength="15" />
          <input type="submit" class="adminLoginBtn" value="관리자로그인" />
        </fieldset>
      </form>
      <!-- //로그인폼 --> 
      <!-- 로그인 안내문 -->
      <ul>
        <li>관리자페이지는 로그인이 필요합니다.</li>
        <li>관리자 ID / PASSWORD를 분실하셨다면 <span>서버담당자에게 연락</span>을 하셔야 합니다.</li>
        <li>전화번호 :  </li>
      </ul>
      <!-- //로그인 안내문 --> 
    </div>
    <!-- 로그인 --> 
  </div>
  <!-- //로그인랩 --> 
  <!-- 카피라이트 -->
  <div id="adminCopyrightWrap"> 
  <jsp:include page="/lmAdm/adm_global_include/adm_copyright_login.jsp" flush="false"></jsp:include>
  </div>
  <!-- //카피라이트 --> 
</div>
<!-- //전체랩 -->
</body>
</html>

  